---
layout: "default"
title: "reverse"
description: "Swift documentation for 'reverse': Return an Array containing the elements of source in reverse."
keywords: "reverse,func,swift,documentation"
root: "/v1.2"
---

<div class="declaration" id="func-reverse-c_-collectiontype-where-c-index_-bidirectionalindextype_-c">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-reverse-c_-collectiontype-where-c-index_-bidirectionalindextype_-c">func <wbr>reverse&lt;C :<wbr> CollectionType where C.Index : BidirectionalIndexType&gt;(<wbr>_: C)</a>
        
<div class="comment collapse" id="comment-func-reverse-c_-collectiontype-where-c-index_-bidirectionalindextype_-c"><div class="p">
    <p>Return an <code>Array</code> containing the elements of <code>source</code> in reverse
order.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func reverse&lt;C : CollectionType where C.Index : BidirectionalIndexType&gt;(source: C) -&gt; [C.Generator.Element]</code>
    
    
</div></div>
</div>
